<?php
$MODEL = getcache('model','commons');
$SITE = getcache('sitelist','commons');
$SEO['site_title'] = $SITE[1]['name'];
$SEO['description'] = $SITE[1]['name'].'为你提供最新的'.$CAT[catname].'图集《'.$title.'》，并整理相关关键词'.$SEO['keyword'].'，供您查看更多相关美女写真图集！';
?>
{template "content","header_page"}
<div class="layui-warp">
  <div class="layui-detail">
  	<div class="layui-detail-left">
	  <div class="layui-detail-title">
		<h1 class="layui-inline">{$title}</h1>(<i id="curpicnumber">1</i>/<span class="layui-inline"><?php echo count($pictureurls);?></span>)
		<div class="layui-detail-item">
		  <div class="layui-type"><i class="layui-icon">&#xe857;</i><span class="layui-badge"><a href="{$CAT[url]}" target="_blank">{$CAT[catname]}</a></span></div>
		  <div class="layui-piccount"><i class="layui-icon">&#xe64a;</i><span class="layui-badge layui-count"><?php echo count($pictureurls);?>P</span></div>
		  <div class="layui-posttime"><i class="layui-icon">&#xe60e;</i><span class="layui-badge layui-date">{date('Y-m-d', strtotime($inputtime))}</span></div>
		  <div class="layui-read"><i class="layui-icon">&#xe613;</i><span id="hits"></span></div>
      {if $posids > 0}<div class="layui-posids"><span class="layui-badge">荐</span></div>{/if}
		</div>
	  </div>
  	  <div class="layui-pic-bar">
  	  	<div class="layui-favorite"><div class="layui-badge"><i class="layui-icon" onclick="add_favorite({$id},{$modelid});" href="javascript:;" >&#xe600;</i><span>添加收藏</span></div></div>
  	  	<div class="layui-enjoy"><a class="layui-heart" href="javascript:;" data-id="{$id}"></a><span id="enjoy">人喜欢</span></div>
		<div class="layui-prompt"><div class="layui-badge"><i class="layui-icon">&#xe60b;</i><span>点击图片切换</span></div></div>
  	  	<div class="layui-scroll" id="allpic" data-parameter="{$catid}-{$id}"><div class="layui-badge"><i class="layui-icon">&#xe60d;</i><span>一图流</span></div></div>
		<div class="layui-bigpic" id="bigpic"><div class="layui-badge"><i class="layui-icon">&#xe615;</i><span>查看原图</span></div></div>
  	  </div>
	  <div class="layui-pic-show">
		<a href="javascript:;" id="showcurpic"><img src="{$pictureurls[0]['url']}" data-pic="0" /></a>
	  </div>
	  <div class="layui-info">
		<div class="bdsharebuttonbox" id="share"><a class="bds_more layui-icon" href="#" data-cmd="more">&#xe641;</a></div>
		<div class="layui-copyurl">
		  <div class="layui-badge"><i class="layui-icon">&#xe64c;</i></div>
		  <div class="url"><input type="text" id="url" value="{go($catid,$id)}" /></div>
		  <div id="copy">复制链接</div>
		</div>
		<div class="layui-tags">
		{php pc_base::load_sys_func('iconv');}
		  {loop $keywords $keyword}
		  {php $letters = gbk_to_pinyin($keyword);$letters=strtolower(implode('',$letters))}
		  <a class="layui-icon" href="{APP_PATH}tags/{$letters}_1.html" target="_blank">&#xe66e; {$keyword}</a>
		  {/loop}
		</div>
	  </div>
    <div class="layui-nextpic">
      <div class="layui-pre"><i class="layui-icon">&#xe65a;</i><a href="{$previous_page[url]}" title="{$previous_page[title]}">{str_cut($previous_page[title],60)}</a></div>
      <div class="layui-next"><i class="layui-icon">&#xe65b;</i><a href="{$next_page[url]}" title="{$next_page[title]}">{str_cut($next_page[title],60)}</a></div>
    </div>
	  <div class="layui-about">
	  	<div class="layui-about-title"><h2>相关图集</h2></div>
	  	<div class="layui-about-box">
		  {pc:content action="relation" relation="$relation" id="$id" catid="$catid" num="10" keywords="$rs[keywords]"}
	  	  <ul>
	  	  {loop $data $r}
	  		<li><span>{date('Y-m-d',$r[inputtime])}</span><a href="{$r[url]}" title="{$r[title]}" target="_blank">{$r[title]}</a></li>
	  		{/loop}
	  	  </ul>
	  	  {/pc}
	  	</div>
	  </div>
	  <div class="layui-guess">
	  	<div class="layui-guess-title"><h2>大家都在看</h2></div>
	  	  <div class="layui-guess-box">
	  	  {pc:get sql="select * from phpcms_picture where catid='$catid' order by digg desc" num="12"}
	  		<ul>
	  		{loop $data $r}
	  	 	<li><a href="{$r[url]}" title="{$r[title]}" target="_blank"><img lay-src="{$r[thumb]}?x-oss-process=style/listpic" alt="{$r[title]}"></a></li>
	  	 	{/loop}
	  		</ul>
	  	  {/pc}
	  	  </div>
	  </div>
	  <div class="layui-comment">
<div id="SOHUCS" sid="{id_encode("content_$catid",$id,$siteid)}" ></div>
<script charset="utf-8" type="text/javascript" src="https://changyan.sohu.com/upload/changyan.js" ></script>
<script type="text/javascript">
window.changyan.api.config({
appid: 'cyttPnySC',
conf: 'prod_091983e81b15b8a51849c71b7b2dc98c'
});
</script>			
	  </div>
  	</div>
  	<div class="layui-detail-right">
  	  <div class="layui-pbox cst-scrollbar">
  		<ul class="layui-pic-list"></ul>
  	  </div>
  	  <div class="layui-rec">
  		<div class="layui-rec-title"><a id="change" class="layui-icon" href="javascript:;" title="换一组">&#xe9aa; 换一组</a><h3>本类随机推荐</h3></div>
  		{pc:content  action="position" posid="1" catid="$catid" order="id DESC" num="10"}
  		<ul class="layui-rec-list">
  		  {loop $data $r}
  		  <li><span>{date('y/m/d',$r[inputtime])}</span><a href="{$r[url]}" title="{$r[title]}" target="_blank">{str_cut($r[title],72)}</a></li>
  		  {/loop}
  		</ul>
  		{/pc}
  	  </div>
  	</div>
  </div>
  {pc:content  action="hits" catid="$catid" num="10" order="views DESC"}
  <div class="layui-hot">
	<div class="layui-hotlist">
	<div class="layui-hot-title"><h2>本类热门图集</h2></div>
    {loop $data $r}
    <div class="layui-box">
      <div class="layui-actions">
        <a class="layui-thumb" href="{$r[url]}" target="_blank"><img lay-src="{$r[thumb]}?x-oss-process=style/midpic" alt="{$r[title]}" /></a> 
      </div>
      <div class="layui-stats">
        <div class="layui-tips">
          {php $db = pc_base::load_model('content_model');$db->table_name = $db->db_tablepre.$MODEL[$modelid]['tablename'].'_data';$_r = $db->get_one(array('id'=>$r[id])); $pictureurls = $_r[pictureurls]; }
          {php $picnum = count(json_decode($pictureurls, true));}
          <div class="layui-piccount"><i class="layui-icon">&#xe64a;</i><span class="layui-badge layui-count" data-num="{$picnum}">{$picnum}P</span></div>
          <div class="layui-posttime"><i class="layui-icon">&#xe609;</i><span class="layui-badge layui-date">{date("Y-m-d", $r[inputtime])}</span></div>
        </div>
        <div class="layui-title">
          <h2><a href="{$r[url]}" title="{$r[title]}" target="_blank">{$r[title]}</a></h2>
        </div>
      </div>
    </div>
    {/loop}
	</div>
  </div> 
  {/pc}
</div>
<script type="text/javascript" src="{APP_PATH}api.php?op=enjoy&id={$id}&modelid={$modelid}"></script>
<script type="text/javascript" src="{APP_PATH}api.php?op=count&id={$id}&modelid={$modelid}"></script>
<script type="text/javascript" src="{LAYUI_PATH}detail.js"></script>
<script type="text/javascript" src="{LAYUI_PATH}uaredirect.js"></script>
<script type="text/javascript">uaredirect("http://m.chunmeitu.com/detail/{$id}.html");</script>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
{template "content","footer"}